/*
 *******************************************************************
 * Author: xuelei
 * Create Date: 2021-09-10 19:06
 * Description: create file
 *******************************************************************
 */
package com.xuelei.cloud.bc;

import com.xuelei.cloud.bc.crypto.exception.CryptoException;

/**
 * @author xuelei
 * @date 2021-09-10
 */
public class Checker {
    
    public static void checkBlock(byte[] block, String exceptionMessage) {
        if (block == null || block.length == 0) {
            throw new IllegalArgumentException(exceptionMessage);
        }
    }
    
    public static void checkText(String text, String exceptionMessage) {
        if (text == null || text.equals("")) {
            throw new IllegalArgumentException(exceptionMessage);
        }
    }
}
